package com.ala4.oxcafe.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * 重置密码DTO
 *
 * @author PING
 * @version 1.0.0
 * @date 2025/8/12 16:36
 */
@Data
public class ResetPasswordDTO {

    @Schema(description = "旧密码")
    @NotNull(message = "旧密码不能为空", groups = {UserReset.class})
    @NotEmpty(message = "旧密码不能为空", groups = {UserReset.class})
    private String oldPassword;

    @Schema(description = "新密码")
    @NotNull(message = "新密码不能为空", groups = {UserReset.class, AdminReset.class})
    @NotEmpty(message = "新密码不能为空", groups = {UserReset.class, AdminReset.class})
    private String newPassword;

    @Schema(description = "用户ID")
    @NotNull(message = "用户ID不能为空", groups = {UserReset.class, AdminReset.class})
    @NotEmpty(message = "用户ID不能为空", groups = {UserReset.class, AdminReset.class})
    private String userId;

    public interface UserReset {
    }

    public interface AdminReset {
    }
}
